<div>
	<h2>Add Products</h2>
	<div class="content">
		<div class="form500">
			<?= Phpr_Form::openTag(array('id'=>$this->listGetFormId())) ?>
				<div class="formFlash"></div>

				<div class="embeddedList search500">
					<?
						$listColumns = array('name', 'sku', 'price');
					?>
					
					<?= $this->listRender(array(
						'list_model_class'=>'Shop_Product',
						'list_columns'=>$listColumns,
						'list_custom_body_cells'=>PATH_APP.'/phproad/modules/db/behaviors/db_listbehavior/partials/_list_body_cb.htm',
						'list_custom_head_cells'=>PATH_APP.'/phproad/modules/db/behaviors/db_listbehavior/partials/_list_head_cb.htm',
						'list_custom_prepare_func'=>'prepare_product_list',
						'list_record_url'=>null,
						'list_search_enabled' => true,
						'list_no_setup_link'=>true,
						'list_search_fields'=> array('@name', 'sku'),
						'list_search_prompt'=>'find products by name or SKU',
						'list_no_form'=>true,
						'list_items_per_page'=>10
					)) ?>
				</div>

				<?= backend_ajax_button('Add', 'onAddProducts', array(), "
					loadIndicator: {show: true, hideOnSuccess: true, injectInElement: true},
					onSuccess: updateProductList
				") ?>
				<?= backend_button('Close', array('onclick'=>'return cancelPopup()')) ?>
			
				<div class="clear"></div>
				<input type="hidden" name="edit_session_key" value="<?= h($session_key) ?>"/>
				<input type="hidden" name="add_product_mode" value="1"/>
			</form>
		</div>
	</div>
</div>